1. Technical Field
The present invention relates in general to a system and method for ray tracing with depth buffered display. More particularly, the present invention relates to a system and method for compositing a ray traced image with a rasterized image using a shared depth buffer.
2. Description of the Related Art
Today's computer image generation technologies produce realistic images in applications such as computer games and flight simulations. The increase of computer system processing speeds is one of the main enablers to generate realistic computer images. A computer image, especially in gaming applications, typically includes many objects that are rendered to generate the image. For example, a gaming application may include objects such as landscaping, mountains, sky, clouds, vehicles and people.
Many approaches are available for generating computer images. Ray tracing is a popular approach to render objects. Ray tracing may be optimized to render an image based upon a specific type of primitive, such as a height field, thereby producing views of a virtual 3-dimensional scene in the form of 2-dimensional images from any view point. As one skilled in the art can appreciate, ray tracing as discussed herein includes other similar rendering techniques, such as ray casting. Ray tracing provides a high-quality image rendering solution but, however, a challenge found is that ray tracing may not meet a user's performance requirements because of its high floating point computation requirements and its irregular and high-bandwidth memory access patterns.
Another popular approach for generating computer images is polygon rendering. With this approach, a rasterizer decomposes polygons into fragments and determines which fragments are visible to a viewer using a depth buffer that stores depth values corresponding to the distance from the viewer to a “fragment” in screen space. For example, some rasterized fragments may correspond to a vehicle and other rasterized fragments may correspond to a pedestrian standing in front of the vehicle. In this example, the rasterizer determines, based upon the depth buffer's values, which rasterized fragments to use at particular screen locations that show the pedestrian standing in front of the vehicle. Polygon rendering provides a high-performance image rendering solution but, however, a challenge found is that polygon rendering produces images that may not meet a user's image quality requirements.
What is needed, therefore, is a system and method that incorporates the high-quality benefits of ray tracing rendering with the high-performance benefits of polygon rendering to efficiently produce realistic computer generated images.